package com.slz3.business.module.messageManagement.mesUser.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.messageManagement.mesUser.domain.MesUser;
import com.slz3.business.module.messageManagement.mesUser.domain.MesUserCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MesUserResAtomic {

    static Mono<ServerResponse> add_$MesUserUpdateLock(ServerRequest req, MesUser mesUser) {
        return MesUserResSafeValid.add(req, mesUser) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.add(req, mesUser);
    }

    public static Mono<ServerResponse> delete_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.delete(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$MesUserUpdateLock(ServerRequest req, MesUser mesUser) {
        return MesUserResSafeValid.modify(req, mesUser) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.modify(req, mesUser);
    }

    static Mono<ServerResponse> info_$MesUserUpdateLock(ServerRequest req) {
        return MesUserResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.auditSubmit(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.audit(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.auditReject(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.usingEnable(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$MesUserUpdateLock(ServerRequest req, MesUserCondition mesUserCondition) {
        return MesUserResSafeValid.usingDisable(req, mesUserCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesUserResExecutor.usingDisable(req);
    }
}
